"Bazel dependencies"

module(
    name = "rules_rs",
    version = "0.0.11",
)

bazel_dep(name = "rules_rust", version = "0.66.0")

# TODO(zbarsky): A bit unfortunate that we need to define a new set of host tools instead of reusing the existing one pulled in by rules_rust.
# Can we figure out how to access that? Perhaps add an alias?
rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools")
rust_host_tools.host_tools(
    name = "rs_rust_host_tools",
)
use_repo(
    rust_host_tools,
    "rs_rust_host_tools",
)

http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

[
    http_file(
        name = "toml2json_" + name,
        executable = True,
        sha256 = sha256,
        url = "https://github.com/dzbarsky/toml2json/releases/download/v0.0.4/toml2json_" + name,
    )
    for name, sha256 in [
        ("darwin_arm64", "9adc44d976e8f5baf5a6d613ceb3db6e5f56b2e22e75ac56521fdce62f227d88"),
        ("darwin_amd64", "425bac4015394fd9840fabcd52ac60fc796a9c10655b36c57e36ffb7dc9f3dd4"),
        ("linux_arm64", "be8376c8e3232a242eae0d187f741a475498a949b942361a9af6e95072ef5670"),
        ("linux_amd64", "f3dd54fabf2d27d0c027b0421860e5d9d909080be1613f0ffd87057633b65e9a"),
    ]
]

bazel_dep(name = "bazel_lib", version = "3.0.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "package_metadata", version = "0.0.5")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_cc", version = "0.2.8")

bazel_dep(name = "rules_go", version = "0.58.2", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.45.0", dev_dependency = True)
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.8.2", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "6.1.2", dev_dependency = True)
